<template>
  <div class="my_cart">
    <img :src="itemObj.pic" alt="" />
    <h5>{{ itemObj.name }}</h5>
    <p>{{ itemObj.characteristic }}</p>
    <section>
      <span style="color:red">￥{{ itemObj.minPrice }}</span>
      <span v-if="sell" class="sell">已售{{itemObj.numberOrders}}</span>
    </section>
  </div>
</template>

<script>
export default {
  props: {
    itemObj: Object,
    sell: {
      type: Boolean,
      default: false
    }
  },
  setup() {},
};
</script>
<style lang="scss" scoped>
.my_cart {
  width: 49%;
  font-size: 14px;
  margin-bottom: 10px;
  img {
    width: 100%;
    height: 224px;
  }
  h5{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    margin-top: 5px;
  }
  p {
    font-size: 12px;
    color: #a8a8a8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    margin: 10px 0;
  }
  .sell{
    float: right;
    font-size: 12px;
    color: #B2B2B2;
  }
}
</style>